{smcl}
{com}{sf}{ul off}{txt}{.-}
      name:  {res}<unnamed>
       {txt}log:  {res}C:\Users\vgonz\Dropbox\Pitt\OneDrive for Business\Dissertation - Vale\Paper 2 - Political-Economic Polarization\Replication\Log\1_4_Switching_Appendix_ESS.smcl
  {txt}log type:  {res}smcl
 {txt}opened on:  {res}29 Aug 2024, 15:37:59

{com}. do "C:\Users\vgonz\Dropbox\Pitt\OneDrive for Business\Dissertation - Vale\Paper 2 - Political-Economic Polarization\Replication\Do\1_4_Switching_Appendix_ESS.do"
{txt}
{com}. *****************************************************************************
. *                                 Figures Descriptives with ESS                                         *
. *                                                                                                                                                       *                       
. * Author:                       Valentina Gonzalez Rostani                                                      *
. * Contact:                      mag384@pitt.edu                                                                 *
. * Date:                         August 9 2024                                                                                   *
. * Version:                      Stata 17                                                                                                *                                                                          
. *                                                                                                                                                       *
. *****************************************************************************
. /*
> This do-file:
> - Creates Table A11 using data from the ESS. 
> 
> Input:
> - Data\Appendix_ESS.dta
> 
> Output:
> - Table A11: Switching in Western European Countries from Mainstream Left to Outsider Radical Right parties 2002-2018 [Table\ESS_switching.tex]
> 
> */
. 
. *Defining Directory
. cd "C:\Users\vgonz\Dropbox\Pitt\OneDrive for Business\Dissertation - Vale\Paper 2 - Political-Economic Polarization\Replication"
{res}C:\Users\vgonz\Dropbox\Pitt\OneDrive for Business\Dissertation - Vale\Paper 2 - Political-Economic Polarization\Replication
{txt}
{com}. 
. *##########################################
. * Load data
. *##########################################
. use "Data\Appendix_ESS.dta", clear 
{txt}
{com}. 
. *****************************************************************************
. * Preparing variables
. *****************************************************************************
. {c -(}
. // Generate a binary variable 'west2' to identify whether a country belongs to the specified list of Western countries. 
. gen west2=(cou=="BEL" | cou=="DNK" | cou=="FIN" | cou=="FRA" | cou=="DEU" | cou=="GRC" | cou=="IRL" | cou=="NLD" | cou=="PRT" | cou=="ESP" | cou=="SWE" | cou=="GBR" | cou=="NOR" | cou=="CHE" | cou=="AUT" | cou=="ITA" | cou=="POL" )
. 
. // Generates a variable called switching comparing parfam and parfam_close. 
.         * Parfam indicates the party family of the  party voted in the last election. 
.         * parfam_close indicates the party family of the party the subject feel close now. 
.         * Switching is defined as voted for another party but now feel close to a nationalist. 
. gen switching2=.
{txt}(424,645 missing values generated)
{com}. replace switching2 =0 if parfam==parfam_close & parfam_close~=. & parfam~=.
{txt}(264,683 real changes made)
{com}. replace switching2 =0 if parfam~=parfam_close & parfam_close~=70 
{txt}(150,503 real changes made)
{com}. replace switching2 =1 if parfam~=70 & parfam_close==70 
{txt}(3,723 real changes made)
{com}. 
. // Generates a variable called switching comparing parfam and parfam_close. The difference with the one before is that this one just look at the left instead of any party.  
. gen switching2_leftboth=.
{txt}(424,645 missing values generated)
{com}. replace switching2_leftboth =0 if parfam==parfam_close & parfam_close~=. & parfam~=.
{txt}(264,683 real changes made)
{com}. replace switching2_leftboth =0 if parfam~=parfam_close & parfam_close~=70 
{txt}(150,503 real changes made)
{com}. replace switching2_leftboth =1 if (parfam==30 | parfam==20 ) & (parfam_close==70 ) 
{txt}(301 real changes made)
{com}. 
. 
. // Encode the string variable 'cntry' into a numeric variable 'country2' with value labels
. encode cntry, gen(country2)
. 
. // Create a new variable 'countr_year' by multiplying 'country2' by 'year'. This creates a unique identifier for each country-year combination
. gen countr_year=country2*year
{txt}(1,651 missing values generated)
{com}. 
. {c )-}
{txt}
{com}. 
. // table A11: Switching in Western European Countries from Mainstream Left to Outsider Radical Right parties 2002-2018
. {c -(}
. eststo clear  // Clear any previously stored estimates
. 
. // Estimate logistic regression for 'switching2' with various predictors, storing the results. First results are swithing from any party. 
. eststo:  logit switching2  meanprobfreyosborne  unemplindiv2 female agea mbtru2 rlgdgr    i.country2 i.year  if west2==1, cluster(countr_year)

{txt}note: {bf:11.country2} != 0 predicts failure perfectly;
      {bf:11.country2} omitted and 10003 obs not used.

note: {bf:14.country2} != 0 predicts failure perfectly;
      {bf:14.country2} omitted and 14459 obs not used.

note: {bf:18.country2} != 0 predicts failure perfectly;
      {bf:18.country2} omitted and 14384 obs not used.

note: {bf:28.country2} != 0 predicts failure perfectly;
      {bf:28.country2} omitted and 11095 obs not used.

{res}{txt}Iteration 0:{space 3}log pseudolikelihood = {res:-10332.283}  
Iteration 1:{space 3}log pseudolikelihood = {res:-9792.0025}  
Iteration 2:{space 3}log pseudolikelihood = {res:-9518.1894}  
Iteration 3:{space 3}log pseudolikelihood = {res:-9509.0329}  
Iteration 4:{space 3}log pseudolikelihood = {res:-9508.4857}  
Iteration 5:{space 3}log pseudolikelihood = {res:-9508.4842}  
Iteration 6:{space 3}log pseudolikelihood = {res:-9508.4842}  
{res}
{txt}Logistic regression{col 56}{lalign 13:Number of obs}{col 69} = {res}{ralign 7:148,688}
{txt}{col 56}{lalign 13:Wald chi2({res:26})}{col 69} = {res}{ralign 7:832.43}
{txt}{col 56}{lalign 13:Prob > chi2}{col 69} = {res}{ralign 7:0.0000}
{txt}Log pseudolikelihood = {res:-9508.4842}{col 56}{lalign 13:Pseudo R2}{col 69} = {res}{ralign 7:0.0797}

{txt}{ralign 85:(Std. err. adjusted for {res:102} clusters in countr_year)}
{hline 20}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 21}{c |}{col 33}    Robust
{col 1}         switching2{col 21}{c |} Coefficient{col 33}  std. err.{col 45}      z{col 53}   P>|z|{col 61}     [95% con{col 74}f. interval]
{hline 20}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
meanprobfreyosborne {c |}{col 21}{res}{space 2}  .626453{col 33}{space 2} .0774689{col 44}{space 1}    8.09{col 53}{space 3}0.000{col 61}{space 4} .4746167{col 74}{space 3} .7782894
{txt}{space 7}unemplindiv2 {c |}{col 21}{res}{space 2} .3177039{col 33}{space 2} .1060878{col 44}{space 1}    2.99{col 53}{space 3}0.003{col 61}{space 4} .1097756{col 74}{space 3} .5256321
{txt}{space 13}female {c |}{col 21}{res}{space 2}-.4446256{col 33}{space 2} .0489859{col 44}{space 1}   -9.08{col 53}{space 3}0.000{col 61}{space 4}-.5406361{col 74}{space 3} -.348615
{txt}{space 15}agea {c |}{col 21}{res}{space 2}-.0124541{col 33}{space 2} .0016757{col 44}{space 1}   -7.43{col 53}{space 3}0.000{col 61}{space 4}-.0157385{col 74}{space 3}-.0091698
{txt}{space 13}mbtru2 {c |}{col 21}{res}{space 2} .0094365{col 33}{space 2} .0629853{col 44}{space 1}    0.15{col 53}{space 3}0.881{col 61}{space 4}-.1140124{col 74}{space 3} .1328855
{txt}{space 13}rlgdgr {c |}{col 21}{res}{space 2}-.0180493{col 33}{space 2} .0092033{col 44}{space 1}   -1.96{col 53}{space 3}0.050{col 61}{space 4}-.0360875{col 74}{space 3}-.0000111
{txt}{space 19} {c |}
{space 11}country2 {c |}
{space 16}BE  {c |}{col 21}{res}{space 2}-.4001553{col 33}{space 2} .2427938{col 44}{space 1}   -1.65{col 53}{space 3}0.099{col 61}{space 4}-.8760225{col 74}{space 3} .0757118
{txt}{space 16}CH  {c |}{col 21}{res}{space 2}-2.077773{col 33}{space 2} .2296245{col 44}{space 1}   -9.05{col 53}{space 3}0.000{col 61}{space 4}-2.527829{col 74}{space 3}-1.627717
{txt}{space 16}DE  {c |}{col 21}{res}{space 2}-.8326856{col 33}{space 2} .4874099{col 44}{space 1}   -1.71{col 53}{space 3}0.088{col 61}{space 4}-1.787991{col 74}{space 3} .1226202
{txt}{space 16}DK  {c |}{col 21}{res}{space 2} .5732042{col 33}{space 2} .1330151{col 44}{space 1}    4.31{col 53}{space 3}0.000{col 61}{space 4} .3124994{col 74}{space 3} .8339091
{txt}{space 16}ES  {c |}{col 21}{res}{space 2}        0{col 33}{txt}  (empty)
{space 16}FI  {c |}{col 21}{res}{space 2} .3173617{col 33}{space 2} .2207106{col 44}{space 1}    1.44{col 53}{space 3}0.150{col 61}{space 4} -.115223{col 74}{space 3} .7499465
{txt}{space 16}FR  {c |}{col 21}{res}{space 2} .5748686{col 33}{space 2} .1522983{col 44}{space 1}    3.77{col 53}{space 3}0.000{col 61}{space 4} .2763695{col 74}{space 3} .8733677
{txt}{space 16}GB  {c |}{col 21}{res}{space 2}        0{col 33}{txt}  (empty)
{space 16}GR  {c |}{col 21}{res}{space 2}-1.380513{col 33}{space 2} .3591819{col 44}{space 1}   -3.84{col 53}{space 3}0.000{col 61}{space 4}-2.084497{col 74}{space 3}-.6765299
{txt}{space 16}IE  {c |}{col 21}{res}{space 2}        0{col 33}{txt}  (empty)
{space 16}IT  {c |}{col 21}{res}{space 2} .2244332{col 33}{space 2} .3575719{col 44}{space 1}    0.63{col 53}{space 3}0.530{col 61}{space 4}-.4763948{col 74}{space 3} .9252611
{txt}{space 16}NL  {c |}{col 21}{res}{space 2} .6197002{col 33}{space 2} .1056598{col 44}{space 1}    5.87{col 53}{space 3}0.000{col 61}{space 4} .4126108{col 74}{space 3} .8267895
{txt}{space 16}NO  {c |}{col 21}{res}{space 2} 1.028404{col 33}{space 2} .2938573{col 44}{space 1}    3.50{col 53}{space 3}0.000{col 61}{space 4} .4524547{col 74}{space 3} 1.604354
{txt}{space 16}PL  {c |}{col 21}{res}{space 2}-3.227171{col 33}{space 2} .6909371{col 44}{space 1}   -4.67{col 53}{space 3}0.000{col 61}{space 4}-4.581382{col 74}{space 3}-1.872959
{txt}{space 16}PT  {c |}{col 21}{res}{space 2}        0{col 33}{txt}  (empty)
{space 16}SE  {c |}{col 21}{res}{space 2}-.5506039{col 33}{space 2} .3257236{col 44}{space 1}   -1.69{col 53}{space 3}0.091{col 61}{space 4} -1.18901{col 74}{space 3} .0878025
{txt}{space 19} {c |}
{space 15}year {c |}
{space 14}2004  {c |}{col 21}{res}{space 2}-.0077375{col 33}{space 2} .4212825{col 44}{space 1}   -0.02{col 53}{space 3}0.985{col 61}{space 4}-.8334359{col 74}{space 3}  .817961
{txt}{space 14}2006  {c |}{col 21}{res}{space 2}-.1070727{col 33}{space 2}  .423179{col 44}{space 1}   -0.25{col 53}{space 3}0.800{col 61}{space 4}-.9364882{col 74}{space 3} .7223428
{txt}{space 14}2008  {c |}{col 21}{res}{space 2} .3506005{col 33}{space 2} .3490065{col 44}{space 1}    1.00{col 53}{space 3}0.315{col 61}{space 4}-.3334397{col 74}{space 3} 1.034641
{txt}{space 14}2010  {c |}{col 21}{res}{space 2} .5733898{col 33}{space 2} .3671428{col 44}{space 1}    1.56{col 53}{space 3}0.118{col 61}{space 4}-.1461969{col 74}{space 3} 1.292976
{txt}{space 14}2012  {c |}{col 21}{res}{space 2}  .334377{col 33}{space 2} .3149788{col 44}{space 1}    1.06{col 53}{space 3}0.288{col 61}{space 4}  -.28297{col 74}{space 3} .9517241
{txt}{space 14}2014  {c |}{col 21}{res}{space 2} .8281829{col 33}{space 2}  .335539{col 44}{space 1}    2.47{col 53}{space 3}0.014{col 61}{space 4} .1705386{col 74}{space 3} 1.485827
{txt}{space 14}2016  {c |}{col 21}{res}{space 2} .9166708{col 33}{space 2} .3427002{col 44}{space 1}    2.67{col 53}{space 3}0.007{col 61}{space 4} .2449908{col 74}{space 3} 1.588351
{txt}{space 14}2018  {c |}{col 21}{res}{space 2} .7136866{col 33}{space 2} .3243732{col 44}{space 1}    2.20{col 53}{space 3}0.028{col 61}{space 4} .0779268{col 74}{space 3} 1.349446
{txt}{space 19} {c |}
{space 14}_cons {c |}{col 21}{res}{space 2}-4.336217{col 33}{space 2} .3048835{col 44}{space 1}  -14.22{col 53}{space 3}0.000{col 61}{space 4}-4.933778{col 74}{space 3}-3.738657
{txt}{hline 20}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
({res}est1{txt} stored)
{com}. eststo:  logit switching2  rti   unemplindiv2  female agea mbtru2 rlgdgr     i.country2 i.year if west2==1, cluster(countr_year)

{txt}note: {bf:11.country2} != 0 predicts failure perfectly;
      {bf:11.country2} omitted and 9697 obs not used.

note: {bf:14.country2} != 0 predicts failure perfectly;
      {bf:14.country2} omitted and 16770 obs not used.

note: {bf:18.country2} != 0 predicts failure perfectly;
      {bf:18.country2} omitted and 15405 obs not used.

note: {bf:28.country2} != 0 predicts failure perfectly;
      {bf:28.country2} omitted and 10977 obs not used.

{res}{txt}Iteration 0:{space 3}log pseudolikelihood = {res:-10775.814}  
Iteration 1:{space 3}log pseudolikelihood = {res:-10228.172}  
Iteration 2:{space 3}log pseudolikelihood = {res:-9962.5478}  
Iteration 3:{space 3}log pseudolikelihood = {res:-9952.8577}  
Iteration 4:{space 3}log pseudolikelihood = {res:-9952.1262}  
Iteration 5:{space 3}log pseudolikelihood = {res:-9952.1193}  
Iteration 6:{space 3}log pseudolikelihood = {res:-9952.1193}  
{res}
{txt}Logistic regression{col 56}{lalign 13:Number of obs}{col 69} = {res}{ralign 7:153,158}
{txt}{col 56}{lalign 13:Wald chi2({res:26})}{col 69} = {res}{ralign 7:700.45}
{txt}{col 56}{lalign 13:Prob > chi2}{col 69} = {res}{ralign 7:0.0000}
{txt}Log pseudolikelihood = {res:-9952.1193}{col 56}{lalign 13:Pseudo R2}{col 69} = {res}{ralign 7:0.0764}

{txt}{ralign 78:(Std. err. adjusted for {res:102} clusters in countr_year)}
{hline 13}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 14}{c |}{col 26}    Robust
{col 1}  switching2{col 14}{c |} Coefficient{col 26}  std. err.{col 38}      z{col 46}   P>|z|{col 54}     [95% con{col 67}f. interval]
{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 9}rti {c |}{col 14}{res}{space 2} .0441593{col 26}{space 2} .0244211{col 37}{space 1}    1.81{col 46}{space 3}0.071{col 54}{space 4}-.0037051{col 67}{space 3} .0920237
{txt}unemplindiv2 {c |}{col 14}{res}{space 2} .3122912{col 26}{space 2} .1055502{col 37}{space 1}    2.96{col 46}{space 3}0.003{col 54}{space 4} .1054167{col 67}{space 3} .5191657
{txt}{space 6}female {c |}{col 14}{res}{space 2}-.4169935{col 26}{space 2} .0506936{col 37}{space 1}   -8.23{col 46}{space 3}0.000{col 54}{space 4}-.5163511{col 67}{space 3}-.3176359
{txt}{space 8}agea {c |}{col 14}{res}{space 2}-.0126036{col 26}{space 2} .0016522{col 37}{space 1}   -7.63{col 46}{space 3}0.000{col 54}{space 4}-.0158418{col 67}{space 3}-.0093653
{txt}{space 6}mbtru2 {c |}{col 14}{res}{space 2}-.0152071{col 26}{space 2} .0596938{col 37}{space 1}   -0.25{col 46}{space 3}0.799{col 54}{space 4}-.1322049{col 67}{space 3} .1017906
{txt}{space 6}rlgdgr {c |}{col 14}{res}{space 2}-.0132213{col 26}{space 2} .0090904{col 37}{space 1}   -1.45{col 46}{space 3}0.146{col 54}{space 4} -.031038{col 67}{space 3} .0045955
{txt}{space 12} {c |}
{space 4}country2 {c |}
{space 9}BE  {c |}{col 14}{res}{space 2} -.398447{col 26}{space 2} .2230251{col 37}{space 1}   -1.79{col 46}{space 3}0.074{col 54}{space 4}-.8355681{col 67}{space 3} .0386741
{txt}{space 9}CH  {c |}{col 14}{res}{space 2}-2.021807{col 26}{space 2} .2334165{col 37}{space 1}   -8.66{col 46}{space 3}0.000{col 54}{space 4}-2.479295{col 67}{space 3}-1.564319
{txt}{space 9}DE  {c |}{col 14}{res}{space 2}-.9344977{col 26}{space 2} .4922578{col 37}{space 1}   -1.90{col 46}{space 3}0.058{col 54}{space 4}-1.899305{col 67}{space 3} .0303098
{txt}{space 9}DK  {c |}{col 14}{res}{space 2} .6101159{col 26}{space 2} .1303739{col 37}{space 1}    4.68{col 46}{space 3}0.000{col 54}{space 4} .3545877{col 67}{space 3} .8656442
{txt}{space 9}ES  {c |}{col 14}{res}{space 2}        0{col 26}{txt}  (empty)
{space 9}FI  {c |}{col 14}{res}{space 2} .3239792{col 26}{space 2} .2341196{col 37}{space 1}    1.38{col 46}{space 3}0.166{col 54}{space 4}-.1348868{col 67}{space 3} .7828451
{txt}{space 9}FR  {c |}{col 14}{res}{space 2} .5489686{col 26}{space 2} .1577716{col 37}{space 1}    3.48{col 46}{space 3}0.001{col 54}{space 4} .2397418{col 67}{space 3} .8581953
{txt}{space 9}GB  {c |}{col 14}{res}{space 2}        0{col 26}{txt}  (empty)
{space 9}GR  {c |}{col 14}{res}{space 2}-1.416238{col 26}{space 2} .3483663{col 37}{space 1}   -4.07{col 46}{space 3}0.000{col 54}{space 4}-2.099023{col 67}{space 3}-.7334526
{txt}{space 9}IE  {c |}{col 14}{res}{space 2}        0{col 26}{txt}  (empty)
{space 9}IT  {c |}{col 14}{res}{space 2} .2270808{col 26}{space 2} .3714044{col 37}{space 1}    0.61{col 46}{space 3}0.541{col 54}{space 4}-.5008585{col 67}{space 3}   .95502
{txt}{space 9}NL  {c |}{col 14}{res}{space 2} .5277525{col 26}{space 2} .1080579{col 37}{space 1}    4.88{col 46}{space 3}0.000{col 54}{space 4}  .315963{col 67}{space 3}  .739542
{txt}{space 9}NO  {c |}{col 14}{res}{space 2} 1.000118{col 26}{space 2} .2904519{col 37}{space 1}    3.44{col 46}{space 3}0.001{col 54}{space 4} .4308429{col 67}{space 3} 1.569393
{txt}{space 9}PL  {c |}{col 14}{res}{space 2}   -3.601{col 26}{space 2} .6843002{col 37}{space 1}   -5.26{col 46}{space 3}0.000{col 54}{space 4}-4.942204{col 67}{space 3}-2.259796
{txt}{space 9}PT  {c |}{col 14}{res}{space 2}        0{col 26}{txt}  (empty)
{space 9}SE  {c |}{col 14}{res}{space 2}-.6319244{col 26}{space 2} .3478986{col 37}{space 1}   -1.82{col 46}{space 3}0.069{col 54}{space 4}-1.313793{col 67}{space 3} .0499443
{txt}{space 12} {c |}
{space 8}year {c |}
{space 7}2004  {c |}{col 14}{res}{space 2}-.1043655{col 26}{space 2} .4163638{col 37}{space 1}   -0.25{col 46}{space 3}0.802{col 54}{space 4}-.9204234{col 67}{space 3} .7116925
{txt}{space 7}2006  {c |}{col 14}{res}{space 2}-.1496606{col 26}{space 2} .4151763{col 37}{space 1}   -0.36{col 46}{space 3}0.718{col 54}{space 4}-.9633911{col 67}{space 3} .6640699
{txt}{space 7}2008  {c |}{col 14}{res}{space 2} .2917426{col 26}{space 2}  .332932{col 37}{space 1}    0.88{col 46}{space 3}0.381{col 54}{space 4}-.3607922{col 67}{space 3} .9442773
{txt}{space 7}2010  {c |}{col 14}{res}{space 2} .4673401{col 26}{space 2} .3602084{col 37}{space 1}    1.30{col 46}{space 3}0.194{col 54}{space 4}-.2386553{col 67}{space 3} 1.173336
{txt}{space 7}2012  {c |}{col 14}{res}{space 2} .2897848{col 26}{space 2} .3087396{col 37}{space 1}    0.94{col 46}{space 3}0.348{col 54}{space 4}-.3153337{col 67}{space 3} .8949033
{txt}{space 7}2014  {c |}{col 14}{res}{space 2} .7882495{col 26}{space 2}  .326437{col 37}{space 1}    2.41{col 46}{space 3}0.016{col 54}{space 4} .1484448{col 67}{space 3} 1.428054
{txt}{space 7}2016  {c |}{col 14}{res}{space 2} .8735676{col 26}{space 2} .3370411{col 37}{space 1}    2.59{col 46}{space 3}0.010{col 54}{space 4} .2129791{col 67}{space 3} 1.534156
{txt}{space 7}2018  {c |}{col 14}{res}{space 2} .6268198{col 26}{space 2} .3342719{col 37}{space 1}    1.88{col 46}{space 3}0.061{col 54}{space 4}-.0283411{col 67}{space 3} 1.281981
{txt}{space 12} {c |}
{space 7}_cons {c |}{col 14}{res}{space 2}-3.910465{col 26}{space 2} .2967508{col 37}{space 1}  -13.18{col 46}{space 3}0.000{col 54}{space 4}-4.492086{col 67}{space 3}-3.328844
{txt}{hline 13}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
({res}est2{txt} stored)
{com}. eststo:  logit switching2  task3cog2and3   unemplindiv2  female agea mbtru2 rlgdgr i.country2 i.year  if west2==1, cluster(countr_year)

{txt}note: {bf:11.country2} != 0 predicts failure perfectly;
      {bf:11.country2} omitted and 11028 obs not used.

note: {bf:14.country2} != 0 predicts failure perfectly;
      {bf:14.country2} omitted and 18354 obs not used.

note: {bf:18.country2} != 0 predicts failure perfectly;
      {bf:18.country2} omitted and 17616 obs not used.

note: {bf:28.country2} != 0 predicts failure perfectly;
      {bf:28.country2} omitted and 12485 obs not used.

{res}{txt}Iteration 0:{space 3}log pseudolikelihood = {res:-11674.141}  
Iteration 1:{space 3}log pseudolikelihood = {res:-11016.757}  
Iteration 2:{space 3}log pseudolikelihood = {res:-10675.189}  
Iteration 3:{space 3}log pseudolikelihood = {res:-10664.585}  
Iteration 4:{space 3}log pseudolikelihood = {res:-10663.867}  
Iteration 5:{space 3}log pseudolikelihood = {res:-10663.863}  
Iteration 6:{space 3}log pseudolikelihood = {res:-10663.863}  
{res}
{txt}Logistic regression{col 56}{lalign 13:Number of obs}{col 69} = {res}{ralign 7:174,298}
{txt}{col 56}{lalign 13:Wald chi2({res:26})}{col 69} = {res}{ralign 7:931.90}
{txt}{col 56}{lalign 13:Prob > chi2}{col 69} = {res}{ralign 7:0.0000}
{txt}Log pseudolikelihood = {res:-10663.863}{col 56}{lalign 13:Pseudo R2}{col 69} = {res}{ralign 7:0.0865}

{txt}{ralign 79:(Std. err. adjusted for {res:102} clusters in countr_year)}
{hline 14}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 15}{c |}{col 27}    Robust
{col 1}   switching2{col 15}{c |} Coefficient{col 27}  std. err.{col 39}      z{col 47}   P>|z|{col 55}     [95% con{col 68}f. interval]
{hline 14}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
task3cog2and3 {c |}{col 15}{res}{space 2} .6982428{col 27}{space 2} .0563492{col 38}{space 1}   12.39{col 47}{space 3}0.000{col 55}{space 4} .5878004{col 68}{space 3} .8086852
{txt}{space 1}unemplindiv2 {c |}{col 15}{res}{space 2} .2698213{col 27}{space 2} .1026312{col 38}{space 1}    2.63{col 47}{space 3}0.009{col 55}{space 4} .0686677{col 68}{space 3} .4709748
{txt}{space 7}female {c |}{col 15}{res}{space 2}-.4637686{col 27}{space 2}  .047182{col 38}{space 1}   -9.83{col 47}{space 3}0.000{col 55}{space 4}-.5562436{col 68}{space 3}-.3712936
{txt}{space 9}agea {c |}{col 15}{res}{space 2}-.0116815{col 27}{space 2} .0015433{col 38}{space 1}   -7.57{col 47}{space 3}0.000{col 55}{space 4}-.0147064{col 68}{space 3}-.0086567
{txt}{space 7}mbtru2 {c |}{col 15}{res}{space 2}-.0036168{col 27}{space 2} .0591219{col 38}{space 1}   -0.06{col 47}{space 3}0.951{col 55}{space 4}-.1194936{col 68}{space 3}   .11226
{txt}{space 7}rlgdgr {c |}{col 15}{res}{space 2}-.0204562{col 27}{space 2} .0086958{col 38}{space 1}   -2.35{col 47}{space 3}0.019{col 55}{space 4}-.0374997{col 68}{space 3}-.0034128
{txt}{space 13} {c |}
{space 5}country2 {c |}
{space 10}BE  {c |}{col 15}{res}{space 2}-.3584645{col 27}{space 2} .2311338{col 38}{space 1}   -1.55{col 47}{space 3}0.121{col 55}{space 4}-.8114784{col 68}{space 3} .0945495
{txt}{space 10}CH  {c |}{col 15}{res}{space 2} -1.89015{col 27}{space 2} .2259069{col 38}{space 1}   -8.37{col 47}{space 3}0.000{col 55}{space 4}-2.332919{col 68}{space 3} -1.44738
{txt}{space 10}DE  {c |}{col 15}{res}{space 2}-.8837012{col 27}{space 2} .4948342{col 38}{space 1}   -1.79{col 47}{space 3}0.074{col 55}{space 4}-1.853558{col 68}{space 3}  .086156
{txt}{space 10}DK  {c |}{col 15}{res}{space 2} .6262212{col 27}{space 2} .1282159{col 38}{space 1}    4.88{col 47}{space 3}0.000{col 55}{space 4} .3749226{col 68}{space 3} .8775198
{txt}{space 10}ES  {c |}{col 15}{res}{space 2}        0{col 27}{txt}  (empty)
{space 10}FI  {c |}{col 15}{res}{space 2} .3468653{col 27}{space 2} .2228829{col 38}{space 1}    1.56{col 47}{space 3}0.120{col 55}{space 4}-.0899771{col 68}{space 3} .7837076
{txt}{space 10}FR  {c |}{col 15}{res}{space 2} .5881999{col 27}{space 2} .1426971{col 38}{space 1}    4.12{col 47}{space 3}0.000{col 55}{space 4} .3085187{col 68}{space 3}  .867881
{txt}{space 10}GB  {c |}{col 15}{res}{space 2}        0{col 27}{txt}  (empty)
{space 10}GR  {c |}{col 15}{res}{space 2} -1.41784{col 27}{space 2} .3405988{col 38}{space 1}   -4.16{col 47}{space 3}0.000{col 55}{space 4}-2.085401{col 68}{space 3}-.7502781
{txt}{space 10}IE  {c |}{col 15}{res}{space 2}        0{col 27}{txt}  (empty)
{space 10}IT  {c |}{col 15}{res}{space 2} .2091611{col 27}{space 2} .3846152{col 38}{space 1}    0.54{col 47}{space 3}0.587{col 55}{space 4}-.5446708{col 68}{space 3}  .962993
{txt}{space 10}NL  {c |}{col 15}{res}{space 2} .5985576{col 27}{space 2} .1013599{col 38}{space 1}    5.91{col 47}{space 3}0.000{col 55}{space 4} .3998959{col 68}{space 3} .7972194
{txt}{space 10}NO  {c |}{col 15}{res}{space 2} 1.025705{col 27}{space 2} .2807753{col 38}{space 1}    3.65{col 47}{space 3}0.000{col 55}{space 4} .4753956{col 68}{space 3} 1.576014
{txt}{space 10}PL  {c |}{col 15}{res}{space 2}-3.293417{col 27}{space 2} .6805593{col 38}{space 1}   -4.84{col 47}{space 3}0.000{col 55}{space 4}-4.627289{col 68}{space 3}-1.959546
{txt}{space 10}PT  {c |}{col 15}{res}{space 2}        0{col 27}{txt}  (empty)
{space 10}SE  {c |}{col 15}{res}{space 2}-.6077908{col 27}{space 2} .3372063{col 38}{space 1}   -1.80{col 47}{space 3}0.071{col 55}{space 4}-1.268703{col 68}{space 3} .0531214
{txt}{space 13} {c |}
{space 9}year {c |}
{space 8}2004  {c |}{col 15}{res}{space 2}-.0795035{col 27}{space 2} .4117177{col 38}{space 1}   -0.19{col 47}{space 3}0.847{col 55}{space 4}-.8864554{col 68}{space 3} .7274484
{txt}{space 8}2006  {c |}{col 15}{res}{space 2}-.1054417{col 27}{space 2} .4045118{col 38}{space 1}   -0.26{col 47}{space 3}0.794{col 55}{space 4}-.8982702{col 68}{space 3} .6873869
{txt}{space 8}2008  {c |}{col 15}{res}{space 2}  .312204{col 27}{space 2} .3401124{col 38}{space 1}    0.92{col 47}{space 3}0.359{col 55}{space 4}-.3544042{col 68}{space 3} .9788121
{txt}{space 8}2010  {c |}{col 15}{res}{space 2}  .507225{col 27}{space 2} .3658286{col 38}{space 1}    1.39{col 47}{space 3}0.166{col 55}{space 4} -.209786{col 68}{space 3} 1.224236
{txt}{space 8}2012  {c |}{col 15}{res}{space 2} .3058779{col 27}{space 2}  .310061{col 38}{space 1}    0.99{col 47}{space 3}0.324{col 55}{space 4}-.3018305{col 68}{space 3} .9135862
{txt}{space 8}2014  {c |}{col 15}{res}{space 2} .8473266{col 27}{space 2} .3290845{col 38}{space 1}    2.57{col 47}{space 3}0.010{col 55}{space 4} .2023328{col 68}{space 3}  1.49232
{txt}{space 8}2016  {c |}{col 15}{res}{space 2} .9271746{col 27}{space 2} .3434855{col 38}{space 1}    2.70{col 47}{space 3}0.007{col 55}{space 4} .2539554{col 68}{space 3} 1.600394
{txt}{space 8}2018  {c |}{col 15}{res}{space 2} .6983667{col 27}{space 2} .3323357{col 38}{space 1}    2.10{col 47}{space 3}0.036{col 55}{space 4} .0470008{col 68}{space 3} 1.349733
{txt}{space 13} {c |}
{space 8}_cons {c |}{col 15}{res}{space 2}-4.485684{col 27}{space 2} .3004265{col 38}{space 1}  -14.93{col 47}{space 3}0.000{col 55}{space 4} -5.07451{col 68}{space 3}-3.896859
{txt}{hline 14}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
({res}est3{txt} stored)
{com}. 
. // Estimate logistic regression for 'switching2_leftboth' (switching from left parties to nationalist) with various predictors, storing the results
. eststo:  logit switching2_leftboth  meanprobfreyosborne  unemplindiv2 female agea mbtru2 rlgdgr     i.country2 i.year   if west2==1, cluster(countr_year)

{txt}note: {bf:5.country2} != 0 predicts failure perfectly;
      {bf:5.country2} omitted and 10710 obs not used.

note: {bf:11.country2} != 0 predicts failure perfectly;
      {bf:11.country2} omitted and 10003 obs not used.

note: {bf:14.country2} != 0 predicts failure perfectly;
      {bf:14.country2} omitted and 14459 obs not used.

note: {bf:18.country2} != 0 predicts failure perfectly;
      {bf:18.country2} omitted and 14384 obs not used.

note: {bf:28.country2} != 0 predicts failure perfectly;
      {bf:28.country2} omitted and 11095 obs not used.

{res}{txt}Iteration 0:{space 3}log pseudolikelihood = {res:-1563.1413}  
Iteration 1:{space 3}log pseudolikelihood = {res:-1509.6577}  
Iteration 2:{space 3}log pseudolikelihood = {res:-1472.9223}  
Iteration 3:{space 3}log pseudolikelihood = {res:-1472.4549}  
Iteration 4:{space 3}log pseudolikelihood = {res:-1472.4535}  
Iteration 5:{space 3}log pseudolikelihood = {res:-1472.4535}  
{res}
{txt}Logistic regression{col 56}{lalign 13:Number of obs}{col 69} = {res}{ralign 7:136,250}
{txt}{col 56}{lalign 13:Wald chi2({res:25})}{col 69} = {res}{ralign 7:119.20}
{txt}{col 56}{lalign 13:Prob > chi2}{col 69} = {res}{ralign 7:0.0000}
{txt}Log pseudolikelihood = {res:-1472.4535}{col 56}{lalign 13:Pseudo R2}{col 69} = {res}{ralign 7:0.0580}

{txt}{ralign 85:(Std. err. adjusted for {res:93} clusters in countr_year)}
{hline 20}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 21}{c |}{col 33}    Robust
{col 1}switching2_leftboth{col 21}{c |} Coefficient{col 33}  std. err.{col 45}      z{col 53}   P>|z|{col 61}     [95% con{col 74}f. interval]
{hline 20}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
meanprobfreyosborne {c |}{col 21}{res}{space 2} .8504655{col 33}{space 2} .2264868{col 44}{space 1}    3.76{col 53}{space 3}0.000{col 61}{space 4} .4065595{col 74}{space 3} 1.294371
{txt}{space 7}unemplindiv2 {c |}{col 21}{res}{space 2} -.132904{col 33}{space 2} .3730373{col 44}{space 1}   -0.36{col 53}{space 3}0.722{col 61}{space 4}-.8640436{col 74}{space 3} .5982356
{txt}{space 13}female {c |}{col 21}{res}{space 2}-.1528637{col 33}{space 2} .1364818{col 44}{space 1}   -1.12{col 53}{space 3}0.263{col 61}{space 4}-.4203632{col 74}{space 3} .1146358
{txt}{space 15}agea {c |}{col 21}{res}{space 2}  .005865{col 33}{space 2} .0031748{col 44}{space 1}    1.85{col 53}{space 3}0.065{col 61}{space 4}-.0003575{col 74}{space 3} .0120874
{txt}{space 13}mbtru2 {c |}{col 21}{res}{space 2} .6078688{col 33}{space 2} .1801451{col 44}{space 1}    3.37{col 53}{space 3}0.001{col 61}{space 4} .2547909{col 74}{space 3} .9609467
{txt}{space 13}rlgdgr {c |}{col 21}{res}{space 2} -.019593{col 33}{space 2} .0253582{col 44}{space 1}   -0.77{col 53}{space 3}0.440{col 61}{space 4}-.0692942{col 74}{space 3} .0301081
{txt}{space 19} {c |}
{space 11}country2 {c |}
{space 16}BE  {c |}{col 21}{res}{space 2}-.6184516{col 33}{space 2} .3447621{col 44}{space 1}   -1.79{col 53}{space 3}0.073{col 61}{space 4}-1.294173{col 74}{space 3} .0572697
{txt}{space 16}CH  {c |}{col 21}{res}{space 2}        0{col 33}{txt}  (empty)
{space 16}DE  {c |}{col 21}{res}{space 2} -.182404{col 33}{space 2} .7573546{col 44}{space 1}   -0.24{col 53}{space 3}0.810{col 61}{space 4}-1.666792{col 74}{space 3} 1.301984
{txt}{space 16}DK  {c |}{col 21}{res}{space 2} 1.127209{col 33}{space 2} .3486581{col 44}{space 1}    3.23{col 53}{space 3}0.001{col 61}{space 4} .4438522{col 74}{space 3} 1.810567
{txt}{space 16}ES  {c |}{col 21}{res}{space 2}        0{col 33}{txt}  (empty)
{space 16}FI  {c |}{col 21}{res}{space 2} .4071342{col 33}{space 2} .3805317{col 44}{space 1}    1.07{col 53}{space 3}0.285{col 61}{space 4}-.3386942{col 74}{space 3} 1.152963
{txt}{space 16}FR  {c |}{col 21}{res}{space 2} .3858092{col 33}{space 2} .3009903{col 44}{space 1}    1.28{col 53}{space 3}0.200{col 61}{space 4}-.2041209{col 74}{space 3} .9757393
{txt}{space 16}GB  {c |}{col 21}{res}{space 2}        0{col 33}{txt}  (empty)
{space 16}GR  {c |}{col 21}{res}{space 2}-1.079402{col 33}{space 2} .7205693{col 44}{space 1}   -1.50{col 53}{space 3}0.134{col 61}{space 4}-2.491692{col 74}{space 3}  .332888
{txt}{space 16}IE  {c |}{col 21}{res}{space 2}        0{col 33}{txt}  (empty)
{space 16}IT  {c |}{col 21}{res}{space 2}-.4722537{col 33}{space 2} .3335507{col 44}{space 1}   -1.42{col 53}{space 3}0.157{col 61}{space 4}-1.126001{col 74}{space 3} .1814936
{txt}{space 16}NL  {c |}{col 21}{res}{space 2} .3601267{col 33}{space 2} .2997338{col 44}{space 1}    1.20{col 53}{space 3}0.230{col 61}{space 4}-.2273408{col 74}{space 3} .9475942
{txt}{space 16}NO  {c |}{col 21}{res}{space 2} .8920097{col 33}{space 2} .4489083{col 44}{space 1}    1.99{col 53}{space 3}0.047{col 61}{space 4} .0121657{col 74}{space 3} 1.771854
{txt}{space 16}PL  {c |}{col 21}{res}{space 2}-1.437733{col 33}{space 2} .7886622{col 44}{space 1}   -1.82{col 53}{space 3}0.068{col 61}{space 4}-2.983483{col 74}{space 3} .1080163
{txt}{space 16}PT  {c |}{col 21}{res}{space 2}        0{col 33}{txt}  (empty)
{space 16}SE  {c |}{col 21}{res}{space 2} .3312037{col 33}{space 2}  .436733{col 44}{space 1}    0.76{col 53}{space 3}0.448{col 61}{space 4}-.5247773{col 74}{space 3} 1.187185
{txt}{space 19} {c |}
{space 15}year {c |}
{space 14}2004  {c |}{col 21}{res}{space 2} .0867694{col 33}{space 2} .5297061{col 44}{space 1}    0.16{col 53}{space 3}0.870{col 61}{space 4}-.9514355{col 74}{space 3} 1.124974
{txt}{space 14}2006  {c |}{col 21}{res}{space 2}-.7511487{col 33}{space 2} .5020525{col 44}{space 1}   -1.50{col 53}{space 3}0.135{col 61}{space 4}-1.735154{col 74}{space 3} .2328561
{txt}{space 14}2008  {c |}{col 21}{res}{space 2} .5282463{col 33}{space 2} .5337547{col 44}{space 1}    0.99{col 53}{space 3}0.322{col 61}{space 4}-.5178936{col 74}{space 3} 1.574386
{txt}{space 14}2010  {c |}{col 21}{res}{space 2} 1.032555{col 33}{space 2} .4291854{col 44}{space 1}    2.41{col 53}{space 3}0.016{col 61}{space 4} .1913673{col 74}{space 3} 1.873743
{txt}{space 14}2012  {c |}{col 21}{res}{space 2} .7513279{col 33}{space 2}  .436241{col 44}{space 1}    1.72{col 53}{space 3}0.085{col 61}{space 4}-.1036888{col 74}{space 3} 1.606345
{txt}{space 14}2014  {c |}{col 21}{res}{space 2} .9898122{col 33}{space 2} .4531707{col 44}{space 1}    2.18{col 53}{space 3}0.029{col 61}{space 4}  .101614{col 74}{space 3}  1.87801
{txt}{space 14}2016  {c |}{col 21}{res}{space 2} 1.283214{col 33}{space 2} .5493012{col 44}{space 1}    2.34{col 53}{space 3}0.019{col 61}{space 4} .2066036{col 74}{space 3} 2.359825
{txt}{space 14}2018  {c |}{col 21}{res}{space 2} .1421439{col 33}{space 2} .5002553{col 44}{space 1}    0.28{col 53}{space 3}0.776{col 61}{space 4}-.8383384{col 74}{space 3} 1.122626
{txt}{space 19} {c |}
{space 14}_cons {c |}{col 21}{res}{space 2}-8.288748{col 33}{space 2} .4727428{col 44}{space 1}  -17.53{col 53}{space 3}0.000{col 61}{space 4}-9.215307{col 74}{space 3}-7.362189
{txt}{hline 20}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
({res}est4{txt} stored)
{com}. eststo:  logit switching2_leftboth  rti  unemplindiv2   female agea  mbtru2 rlgdgr    i.country2 i.year  if west2==1 , cluster(countr_year)

{txt}note: {bf:11.country2} != 0 predicts failure perfectly;
      {bf:11.country2} omitted and 9697 obs not used.

note: {bf:14.country2} != 0 predicts failure perfectly;
      {bf:14.country2} omitted and 16770 obs not used.

note: {bf:18.country2} != 0 predicts failure perfectly;
      {bf:18.country2} omitted and 15405 obs not used.

note: {bf:28.country2} != 0 predicts failure perfectly;
      {bf:28.country2} omitted and 10977 obs not used.

{res}{txt}Iteration 0:{space 3}log pseudolikelihood = {res:-1611.4134}  
Iteration 1:{space 3}log pseudolikelihood = {res:-1568.2685}  
Iteration 2:{space 3}log pseudolikelihood = {res:-1501.2366}  
Iteration 3:{space 3}log pseudolikelihood = {res:-1498.9337}  
Iteration 4:{space 3}log pseudolikelihood = {res: -1498.879}  
Iteration 5:{space 3}log pseudolikelihood = {res:-1498.8789}  
{res}
{txt}Logistic regression{col 56}{lalign 13:Number of obs}{col 69} = {res}{ralign 7:151,345}
{txt}{col 56}{lalign 13:Wald chi2({res:26})}{col 69} = {res}{ralign 7:154.41}
{txt}{col 56}{lalign 13:Prob > chi2}{col 69} = {res}{ralign 7:0.0000}
{txt}Log pseudolikelihood = {res:-1498.8789}{col 56}{lalign 13:Pseudo R2}{col 69} = {res}{ralign 7:0.0698}

{txt}{ralign 85:(Std. err. adjusted for {res:102} clusters in countr_year)}
{hline 20}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 21}{c |}{col 33}    Robust
{col 1}switching2_leftboth{col 21}{c |} Coefficient{col 33}  std. err.{col 45}      z{col 53}   P>|z|{col 61}     [95% con{col 74}f. interval]
{hline 20}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 16}rti {c |}{col 21}{res}{space 2} .1117399{col 33}{space 2} .0634631{col 44}{space 1}    1.76{col 53}{space 3}0.078{col 61}{space 4}-.0126455{col 74}{space 3} .2361254
{txt}{space 7}unemplindiv2 {c |}{col 21}{res}{space 2}-.0903658{col 33}{space 2} .3310239{col 44}{space 1}   -0.27{col 53}{space 3}0.785{col 61}{space 4}-.7391607{col 74}{space 3} .5584291
{txt}{space 13}female {c |}{col 21}{res}{space 2}-.2224176{col 33}{space 2} .1346172{col 44}{space 1}   -1.65{col 53}{space 3}0.098{col 61}{space 4}-.4862626{col 74}{space 3} .0414273
{txt}{space 15}agea {c |}{col 21}{res}{space 2}  .005813{col 33}{space 2} .0033743{col 44}{space 1}    1.72{col 53}{space 3}0.085{col 61}{space 4}-.0008005{col 74}{space 3} .0124264
{txt}{space 13}mbtru2 {c |}{col 21}{res}{space 2} .6323428{col 33}{space 2} .1818408{col 44}{space 1}    3.48{col 53}{space 3}0.001{col 61}{space 4} .2759415{col 74}{space 3} .9887441
{txt}{space 13}rlgdgr {c |}{col 21}{res}{space 2}-.0078695{col 33}{space 2} .0243422{col 44}{space 1}   -0.32{col 53}{space 3}0.746{col 61}{space 4}-.0555793{col 74}{space 3} .0398403
{txt}{space 19} {c |}
{space 11}country2 {c |}
{space 16}BE  {c |}{col 21}{res}{space 2} -.515207{col 33}{space 2} .4164555{col 44}{space 1}   -1.24{col 53}{space 3}0.216{col 61}{space 4}-1.331445{col 74}{space 3} .3010307
{txt}{space 16}CH  {c |}{col 21}{res}{space 2} -2.43524{col 33}{space 2} 1.062667{col 44}{space 1}   -2.29{col 53}{space 3}0.022{col 61}{space 4} -4.51803{col 74}{space 3}-.3524503
{txt}{space 16}DE  {c |}{col 21}{res}{space 2}-.2898024{col 33}{space 2} .7570804{col 44}{space 1}   -0.38{col 53}{space 3}0.702{col 61}{space 4}-1.773653{col 74}{space 3} 1.194048
{txt}{space 16}DK  {c |}{col 21}{res}{space 2} 1.210466{col 33}{space 2} .3794933{col 44}{space 1}    3.19{col 53}{space 3}0.001{col 61}{space 4} .4666733{col 74}{space 3}  1.95426
{txt}{space 16}ES  {c |}{col 21}{res}{space 2}        0{col 33}{txt}  (empty)
{space 16}FI  {c |}{col 21}{res}{space 2} .4548004{col 33}{space 2} .4202377{col 44}{space 1}    1.08{col 53}{space 3}0.279{col 61}{space 4}-.3688504{col 74}{space 3} 1.278451
{txt}{space 16}FR  {c |}{col 21}{res}{space 2} .2791249{col 33}{space 2} .3171439{col 44}{space 1}    0.88{col 53}{space 3}0.379{col 61}{space 4}-.3424657{col 74}{space 3} .9007154
{txt}{space 16}GB  {c |}{col 21}{res}{space 2}        0{col 33}{txt}  (empty)
{space 16}GR  {c |}{col 21}{res}{space 2}-1.597696{col 33}{space 2} .7851774{col 44}{space 1}   -2.03{col 53}{space 3}0.042{col 61}{space 4}-3.136616{col 74}{space 3}-.0587768
{txt}{space 16}IE  {c |}{col 21}{res}{space 2}        0{col 33}{txt}  (empty)
{space 16}IT  {c |}{col 21}{res}{space 2}-.7346262{col 33}{space 2} .5329947{col 44}{space 1}   -1.38{col 53}{space 3}0.168{col 61}{space 4}-1.779277{col 74}{space 3} .3100243
{txt}{space 16}NL  {c |}{col 21}{res}{space 2} .2289332{col 33}{space 2} .3396042{col 44}{space 1}    0.67{col 53}{space 3}0.500{col 61}{space 4}-.4366789{col 74}{space 3} .8945452
{txt}{space 16}NO  {c |}{col 21}{res}{space 2} .8307377{col 33}{space 2} .4674954{col 44}{space 1}    1.78{col 53}{space 3}0.076{col 61}{space 4}-.0855364{col 74}{space 3} 1.747012
{txt}{space 16}PL  {c |}{col 21}{res}{space 2}-2.480543{col 33}{space 2}  1.05702{col 44}{space 1}   -2.35{col 53}{space 3}0.019{col 61}{space 4}-4.552264{col 74}{space 3} -.408821
{txt}{space 16}PT  {c |}{col 21}{res}{space 2}        0{col 33}{txt}  (empty)
{space 16}SE  {c |}{col 21}{res}{space 2} .2942847{col 33}{space 2} .4756272{col 44}{space 1}    0.62{col 53}{space 3}0.536{col 61}{space 4}-.6379275{col 74}{space 3} 1.226497
{txt}{space 19} {c |}
{space 15}year {c |}
{space 14}2004  {c |}{col 21}{res}{space 2} .0237251{col 33}{space 2} .5759515{col 44}{space 1}    0.04{col 53}{space 3}0.967{col 61}{space 4}-1.105119{col 74}{space 3} 1.152569
{txt}{space 14}2006  {c |}{col 21}{res}{space 2}-.2739874{col 33}{space 2} .5203556{col 44}{space 1}   -0.53{col 53}{space 3}0.599{col 61}{space 4}-1.293866{col 74}{space 3} .7458908
{txt}{space 14}2008  {c |}{col 21}{res}{space 2} .7078191{col 33}{space 2} .4974549{col 44}{space 1}    1.42{col 53}{space 3}0.155{col 61}{space 4}-.2671745{col 74}{space 3} 1.682813
{txt}{space 14}2010  {c |}{col 21}{res}{space 2} .9765229{col 33}{space 2} .4584223{col 44}{space 1}    2.13{col 53}{space 3}0.033{col 61}{space 4} .0780316{col 74}{space 3} 1.875014
{txt}{space 14}2012  {c |}{col 21}{res}{space 2} .7789925{col 33}{space 2} .4535215{col 44}{space 1}    1.72{col 53}{space 3}0.086{col 61}{space 4}-.1098934{col 74}{space 3} 1.667878
{txt}{space 14}2014  {c |}{col 21}{res}{space 2} 1.094758{col 33}{space 2} .4696161{col 44}{space 1}    2.33{col 53}{space 3}0.020{col 61}{space 4} .1743272{col 74}{space 3} 2.015189
{txt}{space 14}2016  {c |}{col 21}{res}{space 2} 1.490887{col 33}{space 2} .5311382{col 44}{space 1}    2.81{col 53}{space 3}0.005{col 61}{space 4} .4498757{col 74}{space 3} 2.531899
{txt}{space 14}2018  {c |}{col 21}{res}{space 2} .0583439{col 33}{space 2} .5996905{col 44}{space 1}    0.10{col 53}{space 3}0.922{col 61}{space 4}-1.117028{col 74}{space 3} 1.233716
{txt}{space 19} {c |}
{space 14}_cons {c |}{col 21}{res}{space 2}-7.904056{col 33}{space 2} .5161489{col 44}{space 1}  -15.31{col 53}{space 3}0.000{col 61}{space 4} -8.91569{col 74}{space 3}-6.892423
{txt}{hline 20}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
({res}est5{txt} stored)
{com}. eststo:  logit switching2_leftboth  task3cog2and3  unemplindiv2    female agea mbtru2 rlgdgr     i.country2 i.year  if west2==1 , cluster(countr_year)

{txt}note: {bf:11.country2} != 0 predicts failure perfectly;
      {bf:11.country2} omitted and 11028 obs not used.

note: {bf:14.country2} != 0 predicts failure perfectly;
      {bf:14.country2} omitted and 18354 obs not used.

note: {bf:18.country2} != 0 predicts failure perfectly;
      {bf:18.country2} omitted and 17616 obs not used.

note: {bf:28.country2} != 0 predicts failure perfectly;
      {bf:28.country2} omitted and 12485 obs not used.

{res}{txt}Iteration 0:{space 3}log pseudolikelihood = {res: -1758.891}  
Iteration 1:{space 3}log pseudolikelihood = {res:-1706.2746}  
Iteration 2:{space 3}log pseudolikelihood = {res: -1634.432}  
Iteration 3:{space 3}log pseudolikelihood = {res:-1632.3871}  
Iteration 4:{space 3}log pseudolikelihood = {res:-1632.3358}  
Iteration 5:{space 3}log pseudolikelihood = {res:-1632.3357}  
{res}
{txt}Logistic regression{col 56}{lalign 13:Number of obs}{col 69} = {res}{ralign 7:172,359}
{txt}{col 56}{lalign 13:Wald chi2({res:26})}{col 69} = {res}{ralign 7:149.52}
{txt}{col 56}{lalign 13:Prob > chi2}{col 69} = {res}{ralign 7:0.0000}
{txt}Log pseudolikelihood = {res:-1632.3357}{col 56}{lalign 13:Pseudo R2}{col 69} = {res}{ralign 7:0.0720}

{txt}{ralign 85:(Std. err. adjusted for {res:102} clusters in countr_year)}
{hline 20}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 21}{c |}{col 33}    Robust
{col 1}switching2_leftboth{col 21}{c |} Coefficient{col 33}  std. err.{col 45}      z{col 53}   P>|z|{col 61}     [95% con{col 74}f. interval]
{hline 20}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 6}task3cog2and3 {c |}{col 21}{res}{space 2} .8331219{col 33}{space 2} .1572794{col 44}{space 1}    5.30{col 53}{space 3}0.000{col 61}{space 4} .5248599{col 74}{space 3} 1.141384
{txt}{space 7}unemplindiv2 {c |}{col 21}{res}{space 2}-.1288449{col 33}{space 2} .3511857{col 44}{space 1}   -0.37{col 53}{space 3}0.714{col 61}{space 4}-.8171563{col 74}{space 3} .5594664
{txt}{space 13}female {c |}{col 21}{res}{space 2}-.2127116{col 33}{space 2} .1311879{col 44}{space 1}   -1.62{col 53}{space 3}0.105{col 61}{space 4}-.4698351{col 74}{space 3}  .044412
{txt}{space 15}agea {c |}{col 21}{res}{space 2} .0054528{col 33}{space 2} .0029745{col 44}{space 1}    1.83{col 53}{space 3}0.067{col 61}{space 4}-.0003771{col 74}{space 3} .0112826
{txt}{space 13}mbtru2 {c |}{col 21}{res}{space 2} .6445192{col 33}{space 2}  .175813{col 44}{space 1}    3.67{col 53}{space 3}0.000{col 61}{space 4} .2999321{col 74}{space 3} .9891062
{txt}{space 13}rlgdgr {c |}{col 21}{res}{space 2}-.0194295{col 33}{space 2} .0225376{col 44}{space 1}   -0.86{col 53}{space 3}0.389{col 61}{space 4}-.0636025{col 74}{space 3} .0247434
{txt}{space 19} {c |}
{space 11}country2 {c |}
{space 16}BE  {c |}{col 21}{res}{space 2}-.6209569{col 33}{space 2} .3829359{col 44}{space 1}   -1.62{col 53}{space 3}0.105{col 61}{space 4}-1.371498{col 74}{space 3} .1295837
{txt}{space 16}CH  {c |}{col 21}{res}{space 2}-2.529982{col 33}{space 2} 1.055154{col 44}{space 1}   -2.40{col 53}{space 3}0.016{col 61}{space 4}-4.598046{col 74}{space 3}-.4619178
{txt}{space 16}DE  {c |}{col 21}{res}{space 2}-.3800831{col 33}{space 2} .7600067{col 44}{space 1}   -0.50{col 53}{space 3}0.617{col 61}{space 4}-1.869669{col 74}{space 3} 1.109503
{txt}{space 16}DK  {c |}{col 21}{res}{space 2}  1.12229{col 33}{space 2}  .349186{col 44}{space 1}    3.21{col 53}{space 3}0.001{col 61}{space 4} .4378983{col 74}{space 3} 1.806682
{txt}{space 16}ES  {c |}{col 21}{res}{space 2}        0{col 33}{txt}  (empty)
{space 16}FI  {c |}{col 21}{res}{space 2} .3624334{col 33}{space 2} .3821182{col 44}{space 1}    0.95{col 53}{space 3}0.343{col 61}{space 4}-.3865044{col 74}{space 3} 1.111371
{txt}{space 16}FR  {c |}{col 21}{res}{space 2} .3271742{col 33}{space 2} .2972455{col 44}{space 1}    1.10{col 53}{space 3}0.271{col 61}{space 4}-.2554162{col 74}{space 3} .9097647
{txt}{space 16}GB  {c |}{col 21}{res}{space 2}        0{col 33}{txt}  (empty)
{space 16}GR  {c |}{col 21}{res}{space 2}-1.215997{col 33}{space 2} .7723634{col 44}{space 1}   -1.57{col 53}{space 3}0.115{col 61}{space 4}-2.729801{col 74}{space 3} .2978079
{txt}{space 16}IE  {c |}{col 21}{res}{space 2}        0{col 33}{txt}  (empty)
{space 16}IT  {c |}{col 21}{res}{space 2}-.6371253{col 33}{space 2} .3570413{col 44}{space 1}   -1.78{col 53}{space 3}0.074{col 61}{space 4}-1.336913{col 74}{space 3} .0626629
{txt}{space 16}NL  {c |}{col 21}{res}{space 2}  .206385{col 33}{space 2} .2952586{col 44}{space 1}    0.70{col 53}{space 3}0.485{col 61}{space 4}-.3723112{col 74}{space 3} .7850812
{txt}{space 16}NO  {c |}{col 21}{res}{space 2}  .779211{col 33}{space 2}  .439666{col 44}{space 1}    1.77{col 53}{space 3}0.076{col 61}{space 4}-.0825184{col 74}{space 3}  1.64094
{txt}{space 16}PL  {c |}{col 21}{res}{space 2}-1.560229{col 33}{space 2} .7859211{col 44}{space 1}   -1.99{col 53}{space 3}0.047{col 61}{space 4}-3.100606{col 74}{space 3}-.0198523
{txt}{space 16}PT  {c |}{col 21}{res}{space 2}        0{col 33}{txt}  (empty)
{space 16}SE  {c |}{col 21}{res}{space 2} .1619102{col 33}{space 2} .4509397{col 44}{space 1}    0.36{col 53}{space 3}0.720{col 61}{space 4}-.7219154{col 74}{space 3} 1.045736
{txt}{space 19} {c |}
{space 15}year {c |}
{space 14}2004  {c |}{col 21}{res}{space 2} .0881891{col 33}{space 2} .5533066{col 44}{space 1}    0.16{col 53}{space 3}0.873{col 61}{space 4}-.9962719{col 74}{space 3}  1.17265
{txt}{space 14}2006  {c |}{col 21}{res}{space 2} -.392354{col 33}{space 2} .5178222{col 44}{space 1}   -0.76{col 53}{space 3}0.449{col 61}{space 4}-1.407267{col 74}{space 3} .6225589
{txt}{space 14}2008  {c |}{col 21}{res}{space 2} .6392859{col 33}{space 2} .4994687{col 44}{space 1}    1.28{col 53}{space 3}0.201{col 61}{space 4}-.3396547{col 74}{space 3} 1.618226
{txt}{space 14}2010  {c |}{col 21}{res}{space 2}  .926229{col 33}{space 2} .4507911{col 44}{space 1}    2.05{col 53}{space 3}0.040{col 61}{space 4} .0426946{col 74}{space 3} 1.809763
{txt}{space 14}2012  {c |}{col 21}{res}{space 2} .7732465{col 33}{space 2} .4414194{col 44}{space 1}    1.75{col 53}{space 3}0.080{col 61}{space 4}-.0919196{col 74}{space 3} 1.638413
{txt}{space 14}2014  {c |}{col 21}{res}{space 2} 1.075287{col 33}{space 2} .4723706{col 44}{space 1}    2.28{col 53}{space 3}0.023{col 61}{space 4} .1494574{col 74}{space 3} 2.001116
{txt}{space 14}2016  {c |}{col 21}{res}{space 2} 1.428088{col 33}{space 2} .5337892{col 44}{space 1}    2.68{col 53}{space 3}0.007{col 61}{space 4} .3818804{col 74}{space 3} 2.474296
{txt}{space 14}2018  {c |}{col 21}{res}{space 2} .1555754{col 33}{space 2}  .535933{col 44}{space 1}    0.29{col 53}{space 3}0.772{col 61}{space 4}-.8948339{col 74}{space 3} 1.205985
{txt}{space 19} {c |}
{space 14}_cons {c |}{col 21}{res}{space 2}-8.367574{col 33}{space 2} .5287025{col 44}{space 1}  -15.83{col 53}{space 3}0.000{col 61}{space 4}-9.403812{col 74}{space 3}-7.331336
{txt}{hline 20}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
({res}est6{txt} stored)
{com}. 
. // Generate an output table with specific variables, saving it in the current results
.    esttab       ///
>                 , keep(meanprobfreyosborne task3cog2and3 rti) replace label se compress nogap star(* 0.1 ** 0.05 *** 0.01) ///
>                 b(%6.3f) scalars( "N Observations"  )   ///
>                 indicate("Demographics = *male*" "Socio-econ = *mbtru2*"   "Country FE = *country*" "Year FE = *year", label($\checkmark$ ))    ///
>                 noconstant nonotes nomtitles nodepvars
{res}
{txt}{hline 94}
{txt}                       (1)          (2)          (3)          (4)          (5)          (6)   
{txt}{hline 94}
{res}main                                                                                          {txt}
{txt}Computerizatio~){res}     0.626***                               0.850***                          {txt}
                {res} {ralign 9:{txt:(}0.077{txt:)}}                              {ralign 9:{txt:(}0.226{txt:)}}                             {txt}
{txt}RTI             {res}                  0.044*                                 0.112*               {txt}
                {res}              {ralign 9:{txt:(}0.024{txt:)}}                              {ralign 9:{txt:(}0.063{txt:)}}                {txt}
{txt}Routine         {res}                               0.698***                               0.833***{txt}
                {res}                           {ralign 9:{txt:(}0.056{txt:)}}                              {ralign 9:{txt:(}0.157{txt:)}}   {txt}
{txt}Demographics    {res} $\check~$    $\check~$    $\check~$    $\check~$    $\check~$    $\check~$   {txt}
{txt}Socio-econ      {res} $\check~$    $\check~$    $\check~$    $\check~$    $\check~$    $\check~$   {txt}
{txt}Country FE      {res} $\check~$    $\check~$    $\check~$    $\check~$    $\check~$    $\check~$   {txt}
{txt}Year FE         {res} $\check~$    $\check~$    $\check~$    $\check~$    $\check~$    $\check~$   {txt}
{txt}{hline 94}
{txt}Observations    {res}    148688       153158       174298       136250       151345       172359   {txt}
{txt}{hline 94}
{com}.                 
. 
.    esttab using "Table\ESS_switching.tex", ///
>                  keep(meanprobfreyosborne task3cog2and3 rti) replace label se compress nogap star(* 0.1 ** 0.05 *** 0.01) ///
>                 b(%6.3f) scalars( "N Observations"  )   ///
>                 indicate("Demographics = *male*" "Socio-econ = *mbtru2*"   "Country FE = *country*" "Year FE = *year", label($\checkmark$ ))    ///
>                 noconstant nonotes nomtitles nodepvars
{res}{txt}(output written to {browse  `"Table\ESS_switching.tex"'})
{com}. 
. {c )-}
{txt}
{com}. 
{txt}end of do-file

{com}. exit, clear
